import request from '@/utils/request'

// 查询YmCouponBatch列表
export function listYmCouponBatch(query) {
  return request({
    url: '/api/v1/batchList',
    method: 'get',
    params: query
  })
}

// 查询YmCouponBatch详细
export function getYmCouponBatch(batchId) {
  return request({
    url: '/api/v1/batch/' + batchId,
    method: 'get'
  })
}

// 新增YmCouponBatch
export function addYmCouponBatch(data) {
  return request({
    url: '/api/v1/batch',
    method: 'post',
    data: data
  })
}

// 修改YmCouponBatch
export function updateYmCouponBatch(data) {
  return request({
    url: '/api/v1/batch',
    method: 'put',
    data: data
  })
}

// 删除YmCouponBatch
export function delYmCouponBatch(batchId) {
  return request({
    url: '/api/v1/batch/' + batchId,
    method: 'delete'
  })
}
// 发行YmCouponBatch
export function SendYmCouponBatch(batchId) {
    return request({
        url: '/api/v1/batchBuildCode/' + batchId,
        method: 'get'
    })
}

// 导出YmCouponBatch
export function ExportCode(batchId) {
    return request({
        url: '/api/v1/exportCode/' + batchId,
        method: 'get'
    })
}
